#include "lcd.h"

static unsigned int fb_base;
static unsigned int xres, yres, bpp;

void draw_map(void)
{
	unsigned short* p;
	int x,y;
	get_lcd_params(&fb_base, &bpp, &xres, &yres);
/////lcd为16bpp
	p= (unsigned short*)fb_base;
	for(x=0; x<xres; x++)
	{
		for(y=0; y<yres; y++)
			*p++=0x1f;
	}

	{
	/* 让LCD输出整屏的红色 */

	/* 565: 0xf800 */

	p = (unsigned short *)fb_base;
	for (x = 0; x < xres; x++)
		for (y = 0; y < yres; y++)
			*p++ = 0xf800;

	/* green */
	p = (unsigned short *)fb_base;
	for (x = 0; x < xres; x++)
		for (y = 0; y < yres; y++)
			*p++ = 0x7e0;

	/* blue */
	p = (unsigned short *)fb_base;
	for (x = 0; x < xres; x++)
		for (y = 0; y < yres; y++)
			*p++ = 0x1f;

	/* black */
	p = (unsigned short *)fb_base;
	for (x = 0; x < xres; x++)
		for (y = 0; y < yres; y++)
			*p++ = 0;
		
	}
}


